﻿using DotNetExtensions.AspNet.Http.Events;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using static DotNetExtensions.AspNet.Http.HttpClientFactory;

namespace DotNetExtensions.AspNet.Http
{
    public interface IHttpClient
    {
        event FileTransferProgressDelegate Progress;
        event FileTransferProgressDelegate Before;
        event FileTransferProgressDelegate Completed;
        HttpClientKind Kind { get; }
        bool Busying { get; }
        long RequestId { get; set; }
        HttpResponse Send(string url, Method method = Method.GET);
        HttpResponse Send(string url, HttpRequest content, Method method = Method.POST);

        Task SendAsync(string url, Method method = Method.GET);
        Task SendAsync(string url, HttpRequest content, Method method = Method.POST);

        void Cancel();
    }
}
